package com.yexin.mail.ware.feign;


import com.yexin.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author yexin
 */
@FeignClient("mail-product")
public interface ProductFeignService {

    /**
     * @FeignClient("mail-product")
     * /product/skuinfo/info/{skuId} 商品服务发请求
     *
     *
     * @FeignClient("mail-gateway")
     * /api/product/skuinfo/info/{skuId} 给网关发请求
     * 1、让所有的请求果网关
     *  @FeignClient("mail-product") 给gateway所在的机器发请求
     * 2、直接给后台服务发请求
     *
     * @param skuId
     * @return
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
